/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Version : 50163
 Source Host           : localhost
 Source Database       : cms

 Target Server Version : 50163
 File Encoding         : utf-8

 Date: 02/19/2016 20:32:32 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `wemall_admin`
-- ----------------------------
DROP TABLE IF EXISTS `wemall_admin`;
CREATE TABLE `wemall_admin` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` text NOT NULL,
  `password` text NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` int(2) DEFAULT '1' COMMENT '0 disable  1 enable',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wemall_admin`
-- ----------------------------
BEGIN;
INSERT INTO `wemall_admin` VALUES ('1', 'admin', '21232f297a57a5a743894a0e4a801fc3', '2015-11-06 11:50:57', '1'), ('2', 'john', '527bd5b5d689e2c32ae974c6229ff785', '2016-02-19 20:22:29', '1');
COMMIT;

-- ----------------------------
--  Table structure for `wemall_auth_group`
-- ----------------------------
DROP TABLE IF EXISTS `wemall_auth_group`;
CREATE TABLE `wemall_auth_group` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` char(100) NOT NULL DEFAULT '',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `rules` text NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wemall_auth_group`
-- ----------------------------
BEGIN;
INSERT INTO `wemall_auth_group` VALUES ('1', '超级管理员', '1', '1', '2015-11-06 11:46:17'), ('2', '用户组1', '1', '1,2', '2016-02-19 20:22:54');
COMMIT;

-- ----------------------------
--  Table structure for `wemall_auth_group_access`
-- ----------------------------
DROP TABLE IF EXISTS `wemall_auth_group_access`;
CREATE TABLE `wemall_auth_group_access` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wemall_auth_group_access`
-- ----------------------------
BEGIN;
INSERT INTO `wemall_auth_group_access` VALUES ('1', '1', '1'), ('3', '2', '2');
COMMIT;

-- ----------------------------
--  Table structure for `wemall_auth_rule`
-- ----------------------------
DROP TABLE IF EXISTS `wemall_auth_rule`;
CREATE TABLE `wemall_auth_rule` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(80) NOT NULL DEFAULT '',
  `title` char(20) NOT NULL DEFAULT '',
  `type` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `condition` char(100) NOT NULL DEFAULT '',
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `wemall_auth_rule`
-- ----------------------------
BEGIN;
INSERT INTO `wemall_auth_rule` VALUES ('1', 'Admin/Index/index', '系统首页', '1', '1', '', '2015-10-14 05:51:29'), ('2', 'Admin/Admin/authGroup', '用户组管理', '1', '1', '', '2016-02-19 20:04:29');
COMMIT;

-- ----------------------------
--  Table structure for `wemall_log`
-- ----------------------------
DROP TABLE IF EXISTS `wemall_log`;
CREATE TABLE `wemall_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `product_id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
